package drive.RemakeService.ServiceInterface;

import drive.Model.Secondhanditem;
import drive.Model.TransactionOrder;
import org.springframework.transaction.annotation.Transactional;

import java.util.List;

public interface MarketItemService {


    @Transactional
    String publishMarketItem(Secondhanditem item, List<String> img_url);

    String browseMarketItems();

    String purchaseMarketItem(TransactionOrder transactionOrder);


    String evaluateMarketTransaction(TransactionOrder transactionOrder);

    String reportMarketItem(String token, Integer itemID, String reason);

    String getItemsByTime(String start_time, String end_time, int pageNum, int pageSize);

    String getFirstImageByItemID(int itemID);

    String getImageByItemID(int itemID);

    String searchItems(String keyword, int pageNum, int pageSize);

    String createChatSessionByItem(int user1ID, int user2ID, int itemID);

    @Transactional
    String sendMessage(int chatRoomId, int senderId, String content);

    @Transactional
    String favoriteItem(int userId, int itemId);
}
